import os


class Config(object):
    """配置参数"""
    # 设置连接数据库的URL
    user = 'zxfapp'
    password = "6IkhYfs#Vz"
    database = 'webappDB'
    SQLALCHEMY_DATABASE_URI = 'mysql://%s:%s@127.0.0.1:3306/%s' % (
        user, password, database)
    # 设置sqlalchemy自动更跟踪数据库
    SQLALCHEMY_TRACK_MODIFICATIONS = True
    # 查询时会显示原始SQL语句
    SQLALCHEMY_ECHO = False
    # 禁止自动提交数据处理
    SQLALCHEMY_COMMIT_ON_TEARDOWN = False

    SECRET_KEY = os.urandom(32)

    # # 静态资源
    # template_folder = './templates'
    # static_folder = './templates'
    # static_url_path = ''

    def __repr__(self):
        return str(self.SQLALCHEMY_DATABASE_URI)
